package com.demo.designmode.factory.method2;

/**
 * @Author: jxm
 * @Description: 咖啡店
 * @Date: 2024-1-10 14:46
 * @Version: 1.0
 */
public class CoffeeStore {

    private CoffeeFactory factory;

    public CoffeeStore(CoffeeFactory factory) {
        this.factory = factory;
    }

    public Coffee orderCoffee(String type) {
        Coffee coffee = factory.createCoffee();
//        coffee.addMilk();
//        coffee.addSugar();
        return coffee;
    }
}
